Skip to content

Harden CI: Artifactory OIDC, uv, PyPI Trusted Publishing#535

Open
MichaelGHSeg wants to merge 3 commits into
masterfrom
ci/harden-build-publish
Open

Harden CI: Artifactory OIDC, uv, PyPI Trusted Publishing#535
MichaelGHSeg wants to merge 3 commits into
masterfrom
ci/harden-build-publish

Conversation

@MichaelGHSeg

Copy link
Copy Markdown
Contributor

Summary

  • Add .github/actions/artifactory-oidc/ composite action — exchanges GitHub OIDC token for short-lived Artifactory access token, configures UV_INDEX_URL/PIP_INDEX_URL for virtual-pypi-thirdparty
  • Replace main.yml + tests.yml with ci.yml — fork-aware runner selection, Artifactory resolution on same-repo PRs, SHA-pinned actions, uv-based test matrix (Python 3.9–3.13)
  • Add deploy.yml — PyPI Trusted Publishing (OIDC, no stored token), PEP 740 attestations, gated behind environment: pypi
  • Migrate setup.pypyproject.toml (hatchling) + uv.lock
  • Update devbox.json to use uv
  • Update e2e-tests.yml — remove E2E_TESTS_TOKEN (sdk-e2e-tests going public), SHA-pin actions, fork-aware

Test plan

  • CI workflow runs on this PR (fork path: ubuntu-latest, public PyPI)
  • Artifactory OIDC exchange succeeds on same-repo CI
  • uv sync --frozen passes against committed uv.lock
  • Build job produces installable wheel
  • Before merging: register PyPI Trusted Publisher on pypi.org (repo: segmentio/analytics-python, workflow: deploy.yml, environment: pypi)
  • Before merging: create pypi GitHub environment with protection rules
  • Before merging: set ARTIFACTORY_URL repository variable

- Add Artifactory OIDC composite action for build-time dep resolution
- Replace main.yml + tests.yml with fork-aware ci.yml (uv, SHA-pinned)
- Add deploy.yml: PyPI Trusted Publishing, PEP 740 attestations, no stored tokens
- Migrate setup.py to pyproject.toml (hatchling) + uv.lock
- Update devbox.json to use uv
- Update e2e-tests.yml: remove E2E_TESTS_TOKEN, SHA-pin actions, fork-aware
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant